package com.snow.dayou;

import com.snow.rbac.config.EnableRbac;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Slf4j
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@MapperScan(basePackages = "com.snow.dayou.mapper")
@EnableAspectJAutoProxy(exposeProxy = true)
@EnableRbac
public class DaYouApplication {
    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(DaYouApplication.class, args);
        String serverPort = context.getEnvironment().getProperty("server.port");
        log.info("启动成功! Swagger2: http://127.0.0.1:" + serverPort + "/swagger-ui.html");
    }

}
